package com.wanjl.ssm01.service;

import com.wanjl.ssm01.entity.Person;
import com.wanjl.ssm01.mapper.PersonMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title PersonService
 * @description
 * @create 2024/11/14
 */
@Service
public class PersonService {
    @Resource
    private PersonMapper personMapper;

    public List<Person> selectAll() {
        return personMapper.selectAll();
    }

    public Integer insert(Person person) {
        return personMapper.insert(person);
    }

    public Integer delete(Integer id) {
        return personMapper.delete(id);
    }

    public Integer update(Person person) {
        return null;
    }

    public Person selectById(Integer id) {
        return new Person();
    }
}
